<?php

namespace Admin\Controller;

class PaymentController extends AdminbaseController {

    function _initialize() {
        parent::_initialize();
        $this->currentModel = D("Payment");
    }

    //首页
    public function index() {

        $requestMap = $this->convertRequestToMap();
        $requestMap["pm.status"] = 1;
        $this->assign("begin_time", $_REQUEST["pm#pay_time-egt"]);
        $this->assign("end_time", $_REQUEST["pm#pay_time-elt"]);

        //分页
        $count = $this->currentModel->getListCount($requestMap);
        $page = $this->page($count, C("DEFAULT_PAGE_SIZE"));

        //获取order列表
        $paymentList = $this->currentModel->queryForList($page, $requestMap);
        $this->assign("defaultEnum", C("INVOICE_TYPE"));
        $this->assign('paymentList', $paymentList);
        $this->assign("page", $page->show('Admin', $this->parameter));
        $this->display();

    }


}